<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>头像编辑</title>
</head>
<body>
   <div>编辑页面</div> 
   <form method="post" action="{{ url_for('.avatar') }}" class="info" enctype="multipart/form-data">
        <input type="hidden" name="csrf_token" value="{{ csrf_token }}">
        <li>{{ user.user_id }}</li>
        <li>{{ user.name }}</li>
        <li>{{ user.email }}</li>

        <tr>
            <td>
                <div class="img">
                    <img src="{{ user.avatar }}">
                </div>
            </td>
            <td class="upload">
                <div>
                    <p>上传头像</p>
                    <input name="avatar" id="avatar" type="file">
                </div>
            </td>
        </tr>
        <input class="btn" type="submit" value="提交">
   </form>
</body>
</html>